/*
Brick And Blast, a crossplatform breakout game.
 Copyright (C) 2008-2010 Julien CLEMENT (andematunum@gmail.com)
 
 This program is free software; you can redistribute it and/or
 modify it under the terms of the GNU General Public License
 as published by the Free Software Foundation; either version 2
 of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 

*/

#ifndef _Brick_h_
#define _Brick_h_

/**
* file   Brick.h
* date   Sam 9 jan 2010 10:58:25 CET
* brief  TODO
*/

#include "GameObject.h"

class Brick: public GameObject {
public:
  enum BrickType {
    BRICK_BLUE    = 0x0,
    BRICK_GREEN   = 0x1,
    BRICK_YELLOW  = 0x2,
    BRICK_RED     = 0x3,
    BRICK_PURPLE  = 0x4,
    BRICK_NRJ     = 0x5,
    BRICK_GREY    = 0x6,
    BRICK_B       = 0x7,
    BRICK_L       = 0x8,
    BRICK_A       = 0x9,
    BRICK_S       = 0xa,
    BRICK_T       = 0xb,
    BRICK_WARP    = 0xc,
    BRICK_MULTIBALL     = 0xd,
    BRICK_SUPERBUMPERS  = 0xe,
    BRICK_BLACK         = 0xf, // Not yet defined
    BRICK_NONE    = 0x10f
  };
  /**
    * Build a new Brick object.
    *
    * \param type       Initial type of the brick
    * \param next_type  Secondary type of the brick, used for
    *                   bonus bricks hidden behind others.
    *                   If BRICK_NONE is provided, then energy bricks
    *                   (BRICK_NRJ) will appear randomly.
    * \param position   Fixed pixel position of the brick in the game area.
    */
  Brick(BrickType type, BrickType next_type, SDL_Point& position);
    
  ~Brick();

  void handle_collision (GameObject* obj, const ColliderData& data);
 
private:
  BrickType type_;
  BrickType next_type_;
  int size_init_;
};

#endif

